<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/wx-login.css">
<style type="text/css">
.footer{
    display: none;
}
</style>
</block>
<block name="main">
    <div class="banner">
        <img src="__PUBLIC__images/register-banner-1.png" alt="">
    </div>

    <div class="form">
        <div class="form-group">
            <input type="text" id="phone" class="phone-number" placeholder="请输入您的手机号码">
        </div>
        <div class="form-group">
            <input type="password" id="password" class="password" placeholder="请输入您的登录密码">
        </div>
    </div>

    <div class="btn-wrapper">
        <a href="javascript:" onclick="sub()">绑定账号</a>
        <p class=clearfix> 
        </p>
    </div>
</block>
<block name="js">
<script>
$(function(){
    // 微信用户登录绑定弹框
    var h = '';
    h += '<div class="wx-bangding-layer">'
    h += '<div class="content-wrapper">'
    h += '<p class="text">如果之前登录过8号金融街</p>'
    h += '<p class="text">请选择绑定已有账号</p>'
    h += '<p class="text">未注册请选择注册新账号</p>'
    h += '</div></div>'

    layer.open({
        type: 1
        ,content: h
        ,btn: ['新注册用户', '已有账户']
        ,yes: function (index) {
			location.href="/Home/User/wechat_regist";
        }

    })
})  

function sub(){
	var phone = $('#phone').val();
	var password = $('#password').val()
	password = $.md5(password);
	$.post('{:U("User/msg_ssid")}',{
		phone:phone,
		password:password
	},function(res){
		if(res.err==0){
			layer.open({
				content:res.msg
				, skin: 'msg'
				, time: 1
				,end:function(){
					location.href="/Home/Person/index";
				}
			});
		}else{
			layer.open({
				content:res.msg
				, skin: 'msg'
				, time: 1
				
			});
		}
	})
}
</script>
</block>